<template>
  <div>
    <button @click="num++">增加</button>
    <span>数量:{{num}}</span>
    <button @click="num--">减少</button>
    <br>
    <button @click="fn(100)">点击</button>
    <br>
    <button @click="doClick(101)">点击我</button>

  </div>
</template>

<script>
export default {
  data() {
    return {
      num:1
    }
  },
  methods: {
    fn(n){
      console.log(n);
    },
    doClick(num){
      console.log(num)
    }
  },
}
</script>